157
5144
Estou tentando chamar um AsyncTask por meio de um método da classe ParseQuerys para usar essa informação em um ListView do meu Fragment lvRestaurantFrag. O problema é que o método retorna nulo porque AsyncTask não chega ao onPostExecute. Não sei como posso consertar.
Aqui deixo meu código:
JSON
Link API
[
{
"idBranchRestaurant": 1,
"idRestaurant": 1,
"restaurante":{
"idRestaurant": 1,
"nome": "Don Julio",
"descrição": "La mejor parrilla para cualquier turista",
"rede social":[
{
"idSocialNetworkRestaurant": 1,
"idRestaurant": 1,
"idTypeSocialNetwork": 1,
"valor": "www.donjulio.com.ar",
"modelo":{
"idTypeSocialNetwork": 1,
"nome": "Site",
"ícone": "website_ic.jpg"
}
}
]
},
"idRangePriceBranch": 1,
"RangePrice": {
"idRangePriceBranch": 1,
"idBranchRestaurant": 1,
"mínimo": 300,
"máximo": 600
},
"nome": "Paraguai",
"foto":[
{
"idBranchPhoto": 4,
"idBranchRestaurant": 1,
"branch": null,
"idUser": 0,
"usuário": nulo,
"foto": "entradaDonJulio.jpg"
}
],
"cozinha":[
{
"idCousine": 1,
"nome": "Parrilla"
}
],
"cardápio":[
{
"idTypeMenu": 1,
"nome": "Mediodia",
"idBranchRestaurant": 1,
"placas": nulo
},
{
"idTypeMenu": 2,
"nome": "Noche",
"idBranchRestaurant": 1,
"placas": nulo
}
],
"filtro":[
{
"idTypeFilter": 2,
"nome": "Família",
"ícone": "family_ic.jpg"
}
],
"serviço":[
{
"idService": 2,
"nome": "Comida para celiacos"
},
{
"idService": 1,
"nome": "Wifi"
}
],
"calendário":[
{
"idTimetableBranch": 11,
"idBranchRestaurant": 1,
"idDay": 2,
"openingHour": "19 hs",
"encerrandoHora": "24 hs",
"dia":{
"idDay": 2,
"nome": "terça-feira"
}
},
{
"idTimetableBranch": 10,
"idBranchRestaurant": 1,
"idDay": 2,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 2,
"nome": "terça-feira"
}
},
{
"idTimetableBranch": 9,
"idBranchRestaurant": 1,
"idDay": 1,
"openingHour": "19 hs",
"encerrandoHora": "24 hs",
"dia":{
"idDay": 1,
"nome": "segunda-feira"
}
},
{
"idTimetableBranch": 8,
"idBranchRestaurant": 1,
"idDay": 1,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 1,
"nome": "segunda-feira"
}
},
{
"idTimetableBranch": 12,
"idBranchRestaurant": 1,
"idDay": 3,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 3,
"nome": "quarta-feira"
}
},
{
"idTimetableBranch": 13,
"idBranchRestaurant": 1,
"idDay": 3,
"openingHour": "19 hs",
"encerrandoHora": "24 hs",
"dia":{
"idDay": 3,
"nome": "quarta-feira"
}
},
{
"idTimetableBranch": 14,
"idBranchRestaurant": 1,
"idDay": 4,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 4,
"nome": "quinta-feira"
}
},
{
"idTimetableBranch": 15,
"idBranchRestaurant": 1,
"idDay": 4,
"openingHour": "19 hs",
"encerrandoHora": "24 hs",
"dia":{
"idDay": 4,
"nome": "quinta-feira"
}
},
{
"idTimetableBranch": 16,
"idBranchRestaurant": 1,
"idDay": 5,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 5,
"nome": "sexta-feira"
}
},
{
"idTimetableBranch": 17,
"idBranchRestaurant": 1,
"idDay": 5,
"openingHour": "19 hs",
"closingHour": "2 hs",
"dia":{
"idDay": 5,
"nome": "sexta-feira"
}
}
],
"latitude": "87654322",
"longitude": "23456789",
"calificação": nulo,
"averageFood": 4,0,
"averageService": 4.0,
"averageAmbience": 4.0,
"médiaCalificação": 4,0,
"promoção":[
{
"idPromotion": 3,
"idTypePromotion": 2,
"código": "DIADELPADRE",
"nome": "Dia Del Padre Regalo",
"startDate": "2017-06-26T00: 00: 00",
"expireDate": "2017-06-18T00: 00: 00",
"descrição": "postre de regalo",
"valor": 100,
"modelo":{
"idTypePromotion": 2,
"nome": "Presente"
}
}
]
},
{
"idBranchRestaurant": 2,
"idRestaurant": 2,
"restaurante":{
"idRestaurant": 2,
"nome": "La Hormiga",
"descrição": "el lugar explota de gente y en especial de gente de ort",
"rede social":[
{
"idSocialNetworkRestaurant": 2,
"idRestaurant": 2,
"idTypeSocialNetwork": 2,
"valor": "www.facebook.com/LaHormiga",
"modelo":{
"idTypeSocialNetwork": 2,
"nome": "Facebook",
"ícone": "fb_ic.jpg"
}
}
]
},
"idRangePriceBranch": 1,
"RangePrice": {
"idRangePriceBranch": 1,
"idBranchRestaurant": 1,
"mínimo": 300,
"máximo": 600
},
"nome": "Ort",
"foto":[
{
"idBranchPhoto": 5,
"idBranchRestaurant": 2,
"branch": null,
"idUser": 0,
"usuário": nulo,
"foto": "entradaLaHormiga.jpg"
}
],
"cozinha":[
{
"idCousine": 2,
"nome": "Pizza"
}
],
"cardápio":[
{
"idTypeMenu": 3,
"nome": "Mediodia",
"idBranchRestaurant": 2,
"placas": nulo
}
],
"filtro":[
{
"idTypeFilter": 1,
"name": "Com Desconto",
"ícone": "discount_ic.jpg"
}
],
"serviço":[
{
"idService": 3,
"nome": "Aire acondicionado"
},
{
"idService": 1,
"nome": "Wifi"
}
],
"calendário":[
{
"idTimetableBranch": 18,
"idBranchRestaurant": 2,
"idDay": 6,
"openingHour": "11 hs",
"encerrandoHora": "15 hs",
"dia":{
"idDay": 6,
"nome": "sábado"
}
},
{
"idTimetableBranch": 19,
"idBranchRestaurant": 2,
"idDay": 7,
"openingHour": "11 hs",
"encerrandoHora": "15 hs",
"dia":{
"idDay": 7,
"nome": "domingo"
}
}
],
"latitude": "234567897",
"longitude": "123456789",
"calificação": nulo,
"averageFood": 5,0,
"averageService": 5.0,
"averageAmbience": 5.0,
"médiaCalificação": 5,0,
"promoção":[
]
},
{
"idBranchRestaurant": 3,
"idRestaurant": 3,
"restaurante":{
"idRestaurant": 3,
"nome": "paja rota",
"descrição": "La mejor parrilla de ramosmejia ",
"rede social":[
{
"idSocialNetworkRestaurant": 3,
"idRestaurant": 3,
"idTypeSocialNetwork": 3,
"valor": "twitter.com/Pajarota",
"modelo":{
"idTypeSocialNetwork": 3,
"nome": "Twitter",
"ícone": "ic_twitter.png"
}
}
]
},
"idRangePriceBranch": 3,
"RangePrice": {
"idRangePriceBranch": 3,
"idBranchRestaurant": 3,
"mínimo": 50,
"máximo": 250
},
"nome": "Ramos MEjia",
"foto":[
{
"idBranchPhoto": 6,
"idBranchRestaurant": 3,
"branch": null,
"idUser": 0,
"usuário": nulo,
"foto": "EntradaPajaRota.jpg"
}
],
"cozinha":[
{
"idCousine": 1,
"nome": "Parrilla"
}
],
"cardápio":[
{
"idTypeMenu": 4,
"nome": "Mediodia",
"idBranchRestaurant": 3,
"placas": nulo
},
{
"idTypeMenu": 5,
"nome": "Noche",
"idBranchRestaurant": 3,
"placas": nulo
}
],
"filtro":[
{
"idTypeFilter": 2,
"nome": "Família",
"ícone": "family_ic.jpg"
}
],
"serviço":[
{
"idService": 1,
"nome": "Wifi"
},
{
"idService": 4,
"nome": "Carta de braille"
}
],
"calendário":[
{
"idTimetableBranch": 20,
"idBranchRestaurant": 3,
"idDay": 5,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 5,
"nome": "sexta-feira"
}
},
{
"idTimetableBranch": 21,
"idBranchRestaurant": 3,
"idDay": 5,
"openingHour": "19 hs",
"closingHour": "2 hs",
"dia":{
"idDay": 5,
"nome": "sexta-feira"
}
},
{
"idTimetableBranch": 22,
"idBranchRestaurant": 3,
"idDay": 6,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 6,
"nome": "sábado"
}
},
{
"idTimetableBranch": 23,
"idBranchRestaurant": 3,
"idDay": 6,
"openingHour": "19 hs",
"closingHour": "2 hs",
"dia":{
"idDay": 6,
"nome": "sábado"
}
},
{
"idTimetableBranch": 24,
"idBranchRestaurant": 3,
"idDay": 7,
"openingHour": "12 hs",
"encerrandoHora": "16 hs",
"dia":{
"idDay": 7,
"nome": "domingo"
}
}
],
"latitude": "12345678",
"longitude": "87654321",
"calificação": nulo,
"averageFood": 5,0,
"averageService": 5.0,
"averageAmbience": 5.0,
"médiaCalificação": 5,0,
"promoção":[
]
},
{
"idBranchRestaurant": 4,
"idRestaurant": 4,
"restaurante":{
"idRestaurant": 4,
"nome": "la espiga",
"descrição": "el mejor lugar para comer massas",
"rede social":[
{
"idSocialNetworkRestaurant": 4,
"idRestaurant": 4,
"idTypeSocialNetwork": 4,
"valor": "instagram.com/laespiga",
"modelo":{
"idTypeSocialNetwork": 4,
"nome": "Instagram",
"ícone": "ic_Instagram.png"
}
}
]
},
"idRangePriceBranch": 4,
"RangePrice": {
"idRangePriceBranch": 4,
"idBranchRestaurant": 4,
"mínimo": 80,
"máximo": 150
},
"nome": "Almagro",
"foto":[
{
"idBranchPhoto": 7,
"idBranchRestaurant": 4,
"branch": null,
"idUser": 0,
"usuário": nulo,
"foto": "EntradaLaEspiga.jpg"
}
],
"cozinha":[
{
"idCousine": 4,
"nome": "Massa"
}
],
"cardápio":[
{
"idTypeMenu": 6,
"nome": "Tarde",
"idBranchRestaurant": 4,
"placas": nulo
}
],
"filtro":[
{
"idTypeFilter": 1,
"name": "Com Desconto",
"ícone": "discount_ic.jpg"
}
],
"serviço":[
{
"idService": 1,
"nome": "Wifi"
},
{
"idService": 3,
"nome": "Aire acondicionado"
}
],
"calendário":[
{
"idTimetableBranch": 26,
"idBranchRestaurant": 4,
"idDay": 1,
"openingHour": "16 hs",
"encerrandoHora": "19 hs",
"dia":{
"idDay": 1,
"nome": "segunda-feira"
}
},
{
"idTimetableBranch": 27,
"idBranchRestaurant": 4,
"idDay": 2,
"openingHour": "16 hs",
"encerrandoHora": "19 hs",
"dia":{
"idDay": 2,
"nome": "terça-feira"
}
},
{
"idTimetableBranch": 28,
"idBranchRestaurant": 4,
"idDay": 3,
"openingHour": "16 hs",
"encerrandoHora": "19 hs",
"dia":{
"idDay": 3,
"nome": "quarta-feira"
}
},
{
"idTimetableBranch": 29,
"idBranchRestaurant": 4,
"idDay": 4,
"openingHour": "16 hs",
"encerrandoHora": "19 hs",
"dia":{
"idDay": 4,
"nome": "quinta-feira"
}
},
{
"idTimetableBranch": 30,
"idBranchRestaurant": 4,
"idDay": 5,
"openingHour": "16 hs",
"closingHour": "19 hs",
"dia":{
"idDay": 5,
"nome": "sexta-feira"
}
}
],
"latitude": "87657467",
"longitude": "45254567",
"calificação": nulo,
"averageFood": 5,0,
"averageService": 5.0,
"averageAmbience": 5.0,
"médiaCalificação": 5,0,
"promoção":[
]
}
]
Classe ParseQuery
servidor String privado = "http://appmorfando.azurewebsites.net/api/";
ParsingObjects parse = new ParsingObjects ();
// Consulta para List Branches
private ArrayList  branches = new ArrayList  ();
public ArrayList  getAllBranch (int limit, int offset) {
new BranchGetAll (). execute ("branch /", limit + "", offset + "");
retornar ramos;
}
classe privada BranchGetAll estende AsyncTask > {
protected void onPostExecute (ArrayList  datos) {
super.onPostExecute (dados);
ramos = dados;
}
@Sobrepor
protegido ArrayList  doInBackground (String ... parametros) {
String url = parametros [0] + parametros [1] + "/" + parametros [2];
ArrayList  branchList = novo ArrayList  ();
Cliente OkHttpClient = novo OkHttpClient ();
Solicitar solicitação = novo Request.Builder ()
.url (servidor + url)
.Construir();
Resultado da string;
tentar {
Resposta de resposta = client.newCall (solicitação) .execute (); // Llamo al API Rest servicio1 en ejemplo.com
resultado = resposta.body (). string ();
} catch (IOException e) {
Log.d ("Erro", e.getMessage ()); // Error de Network
return null;
}
tentar{
JSONArray jsonBranch = novo JSONArray (resultado);
para (int i = 0; i  listBranches;
public View onCreateView (LayoutInflater inflater, grupo ViewGroup, dados Bundle) {
Exibir para retornar;
toReturn = inflater.inflate (R.layout.frag_restaurant_lv, grupo, falso);
main = (MainActivity) getActivity ();
pq = novo ParseQuery ();
restaurantItems = (ListView) toReturn.findViewById (R.id.lvRestaurantItems);
// Aqui fica nulo, então o tamanho do adaptador é 0
listBranches = pq.getAllBranch (10,0);
adaptador = novo lvRestaurantAdapter (listBranches, principal);
restaurantItems.setAdapter (adaptador);
restaurantItems.setOnItemClickListener (this);
return toReturn;
}
@Sobrepor
public void onItemClick (AdapterView  parent, View view, int position, long id) {
int idBranch = adapter.getId (posição);
main.BranchSelected (idBranch);
}
} 
2 coisas aqui:
Como você sabe que sua asynctask não está chegando ao onpostexecute? Seu código anexado não sobrescreve no pós-execução. Vamos tentar implementar esse método e fazer um logcat simples ou system.out para confirmar.
Sua asynctask está obtendo objetos Json do servidor e empacotando-os em uma lista a ser retornada. Existem várias maneiras de falhar, como conexão de servidor ruim ou análise incorreta de json. Eu testaria cuidadosamente sua conexão e estrutura de dados para ter certeza de que o nulo é algo que a tarefa async está causando.
Uma das maneiras mais simples de testar é comentar todo o código relacionado a conexão e JSON e, em seguida, retornar uma lista preenchida manualmente que você sabe que funciona. Isso ajudará a isolar a área que está falhando.
1
|
sua resposta
StackExchange.ifUsing ("editor", function () {
StackExchange.using ("externalEditor", function () {
StackExchange.using ("snippets", function () {
StackExchange.snippets.init ();
});
});
}, "partes de codigo");
StackExchange.ready (function () {
var channelOptions = {
tags: "" .split (""),
id: "1"
};
initTagRenderer ("". split (""), "" .split (""), channelOptions);
StackExchange.using ("externalEditor", function () {
// Tem que disparar o editor após os snippets, se os snippets estiverem habilitados
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using ("snippets", function () {
createEditor ();
});
}
outro {
createEditor ();
}
});
function createEditor () {
StackExchange.prepareEditor ({
useStacksEditor: false,
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputaçãoToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by \ u003ca href = \" https: //imgur.com/ \ "\ u003e \ u003csvg class = \" svg-icon \ "width = \" 50 \ "height = \" 18 \ "viewBox = \ "0 0 50 18 \" fill = \ "none \" xmlns = \ "http: //www.w3.org/2000/svg \" \ u003e \ u003cpath d = \ "M46.1709 9.17788C46.1709 8.26454 46,2665 7,94324 47,1084 7,58816C47.4091 7,46349 47,7169 7,36433 48,0099 7,26993C48.9099 6,97997 49,672 6,73443 49,672 5,93063C49,672 5,22043 48,9832 4,61182 48,1414 4,61182C47,4335 4,26993C48.9099 6,97997 49,672 6,73443 49,672 5,93063C49,672 5,22043 48,9832 4,61182 48,1414 4,61182C47,4335 4,6431182 4,25.654,23,7623,74,6281 4,9281 467823,621 4,96281 4,9823,623,623,461,45,023,74,6281 4,9823,1623,623,14,6281 4,9282 C 4,9281 4,923,623,623,76,2 53,76,23,76,823,14,65,0281 4,928,023,623,14,65,0281 4,928,023,623. 43.1481 6.59048V11.9512C43.1481 13.2535 43.6264 13.8962 44.6595 13.8962C45.6924 13.8962 46.1709 13.2535 46.1709 11.9512V9.17788Z \ "/ \ u003e \ u003cpath d = \" M32.492 10.1439219 C32.492.492. 41.5985 12.6954 41.5985 10.1419V6.59049C41.5985 5.28821 41.1394 4.66232 40.1061 4.66232C39.0732 4.66232 38.5948 5.28821 38.5948 6.59049V9.60062C38.5948 10.8521 38.2696 11.5455 37.0454 11.5204 11.5204 11.5458.5948.5948 5.28821 38.5948 6.59049V9.60062C38.5948 10.8521 38.2696 11.5455 37.0454 11.520 11.520 11.5204 11.520 11.5204 11.5204 11.5458 11.5204 11.5204 11.5204 11.520 c 11.5204 11.520. 521 35.4954 9.60062V6.59049C35.4954 5.28821 35.0173 4.66232 34.0034 4.66232C32.9703 4.66232 32.492 5.28821 32.492 6.59049V10.1419Z \ "/ \ u003e \ u003cpath fill-rule = \" evenodd \ "clip-rule = \" evenodd \ "clip-rule = ” .1369 4.56087 21.0134 6.57349 21.0134 9.27932C21.0134 11.9852 23.003 13,913 25.3754 13.913C26.5612 13,913 27.4607 13.4902 28.1109 12.6616C28.1109 12.7229 28.1161 12.7799 28.779 28.121 12.8346C 25.3754 13.913C26.5612 13,913 27.4607 13.4902 28.1109 12.6616C28.1109 12.7229 28.1161 12.7799 28.7799 2877121 12.8346C 27.4607 13.4902. 15,2321 24,1352 14,9821 23,5661 14.7787C23.176 14,6393 22,8472 14,5218 22,5437 14.5218C21.7977 14,5218 21,2429 15,0123 21,2429 15.6887C21.2429 16,7375 22,9072 17,6335 25,6622 17.6335ZM24.1317 9.27932C24.1317 7,94324 24,9928 7,09766 26,1024 7.09766C 28,0918 7,94324 7,09766 27,2119 28,0918 9.27932C28.0918 10,6321 27,2311 11,5116 26,1024 11.5116C24.9737 11,5116 24,1317 10,6491 24,1317 9.27932Z \ "/ \ u003e \ u003cpath d = \" M16.8045 11.9512C16.8045 17,2637 13,8962 18,2965 13,2535 13,8962 13.8962C19.3298 19,8079 13,2535 19,8079 11.9512V8.12928C19.8079 5,82936 18,4879 4,62866 16,4027 4.62866C15.1594 4,62866 14,279 4,98375 13,3609 5.88013C12.653 5,05154 11,6581 4,62866 10,3573 4.62866C9.34336 4,62866 8,57809 4,89931 7,9466 5.5079C7.58314 4,9328 7,10506 4,66232 6,51203 4,66232 4.66232C5.47873 5,00066 5,28821 5,00066 6.59049V11.9512C5.00066 13,2535 5,47873 13,8962 6,51203 13.8962C7.54479 13,8962 8,0232 13,2535 8,0232 11.9512V8.90741C8.0232 7,58817 8,44431 6,91179 9,53458 6.91179C10.5104 6,91179 10,893 7,58817 10,893 8.94108V11.9512C10.893 13,2535 11,3711 13,8962 12,4044 13,8962 C13,4375 13,8962 13,9157 13,2535 13,9157 11,9512V8.90741C13,9157 7,58817 14,3365 6,91179 15,4269 6,91179C16,4027 6,91179 16,8045 7,58817 16,8045 8,94108V11.9512Z \ "/ \ u003e \ u003cpath d = \ "M3.31675 6.59049C3.31675 5.28821 2.83866 4.66232 1.82471 4.66232C0.791758 4.66232 0.313354 5.28821 0.313354 6.59049V11.9512C0.313354 13,2535 0.791775 13.8962 1.82471 4.66232C0.791758 4.66232 0.313354 5.28821 0.313354 6.59049V11.9512C0.313354 13,2535 0.79177513.82471 4.66232C0.791758 4.66232 0.313354 5.28821 0.313354 6.59049V11.9512C0.313354 13,2535 0.791775 13.892.18241.871.871.58.3251.3251.3251.3251.3251.35.13354 6.59049V11.11.9512V6.59049Z \ "/ \ u003e \ u003cpath d = \" M1.87209 0.400291C0.843612 0,400291 0 1,1159 0 1.98861C0 0,822846 3,57676 1,87209 2,87869 3.57676C2.90056 3,57676 3,7234 2,87869 3,7234 2,90056 0,400291 1.98861C3.7234 1,1159 1,87209 0.400291Z \ "fill = \" # 1BB76E \ "/ \ u003e \ u003c / svg \ u003e \ u003c / a \ u003e",
contentPolicyHtml: "Contribuições do usuário licenciadas sob \ u003ca href = \" https: //stackoverflow.com/help/licensing \ "\ u003ecc by-sa \ u003c / a \ u003e \ u003ca href = \" https://stackoverflow.com / legal / content-policy \ "\ u003e (política de conteúdo) \ u003c / a \ u003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
, imediatamenteShowMarkdownHelp: true, enableTables: true, enableSnippets: true
});
}
});
Obrigado por contribuir com uma resposta para Stack Overflow!
Certifique-se de responder à pergunta. Forneça detalhes e compartilhe sua pesquisa!
Mas evite ...
Pedir ajuda, esclarecimento ou responder a outras respostas.
Fazer declarações com base em opinião; apoie-os com referências ou experiência pessoal.
Para saber mais, veja nossas dicas sobre como escrever boas respostas.
Rascunho salvo
Rascunho descartado
Cadastre-se ou faça o login
StackExchange.ready (function () {
StackExchange.helpers.onClickDraftSave ('# login-link');
});
Inscreva-se usando o Google
Cadastre-se usando o Facebook
Inscreva-se usando e-mail e senha
Enviar
Postar como convidado
Nome
O email
Obrigatório, mas nunca mostrado
StackExchange.ready (
function () {
StackExchange.openid.initPostLogin ('. New-post-login', 'https% 3a% 2f% 2fstackoverflow.com% 2fquestions% 2f45538107% 2fcall-asynctack-from-other-class-and-return-null-android-studio% 23nova resposta ',' question_page ');
}
);
Postar como convidado
Nome
O email
Obrigatório, mas nunca mostrado
Publique a sua resposta
Descartar
Ao clicar em “Publique sua resposta”, você concorda com nossos termos de serviço, política de privacidade e política de cookies
Não é a resposta que você está procurando? Navegue por outras questões com a tag java android json android-asynctask ou faça sua própria pergunta.